<?php

declare(strict_types=1);
/**
 * This file is part of Hyperf.
 *
 * @link     https://www.hyperf.io
 * @document https://hyperf.wiki
 * @contact  group@hyperf.io
 * @license  https://github.com/hyperf/hyperf/blob/master/LICENSE
 */

use Hyperf\HttpServer\Router\Router;

Router::get('/favicon.ico', function () {
    return '';
});


//
//Router::addServer('Http', function () {
//    Router::get('/', 'App\Api\IndexController@index');
////    Router::get('/api/ceshi/index', 'App\Api\CeshiController@index');
////    Router::addRoute('/device/list', 'App\Api\DeviceController@list');
//    Router::post('/device/log', 'App\Api\DeviceController@log');
//    Router::post('/device/lockBack', 'App\Api\DeviceController@lockBack');
//    Router::get('/device/lockBack', 'App\Api\DeviceController@lockBack');
//    Router::put('/device/lockBack', 'App\Api\DeviceController@lockBack');
//    Router::post('/device/editSys', 'App\Api\DeviceController@editSys');
//    Router::post('/device/search', 'App\Api\DeviceController@search');
//    Router::post('/device/detailDevice', 'App\Api\DeviceController@detailDevice');
//
//
//    Router::post('/user/login', 'App\Api\UserController@login');
//    Router::post('/user/register', 'App\Api\UserController@register');
//    Router::post('/energyMeter/dev/detail', 'Addons\EnergyMeter\Controller\DevController@detail');
//    Router::post('/energyMeter/dev/uniNum', 'Addons\EnergyMeter\Controller\DevController@uniNum');
//
//    //智能门锁
//    Router::post('/doorlock/diandi/saveDna','Addons\Doorlock\Controller\DiandiController@saveDna');
//    Router::post('/doorlock/diandi/bindDev', 'Addons\Doorlock\Controller\DiandiController@bindDev');
//    Router::post('/doorlock/diandi/delDev', 'Addons\Doorlock\Controller\DiandiController@delDev');
//    Router::post('/doorlock/diandi/setSystemParams', 'Addons\Doorlock\Controller\DiandiController@setSystemParams');
//    Router::post('/doorlock/diandi/dnaInfo', 'Addons\Doorlock\Controller\DiandiController@dnaInfo');
//    Router::post('/doorlock/diandi/removeDev', 'Addons\Doorlock\Controller\DiandiController@removeDev');
//
//    //智能门锁网关
////    回调
//    Router::post('/doorlock/gw/lockBack', 'Addons\Doorlock\Controller\GwController@lockBack');
//    Router::get('/doorlock/gw/lockBack', 'Addons\Doorlock\Controller\GwController@lockBack');
//    Router::put('/doorlock/gw/lockBack', 'Addons\Doorlock\Controller\GwController@lockBack');
//
//    Router::post('/doorlock/gw/addLock', 'Addons\Doorlock\Controller\GwController@addLock');
//    Router::post('/doorlock/gw/platformCallBackUrlSet','Addons\Doorlock\Controller\GwController@platformCallBackUrlSet');
//    Router::post('/doorlock/gw/hxjGatewayBind','Addons\Doorlock\Controller\GwController@hxjGatewayBind');
//    Router::post('/doorlock/gw/hxjDelGateway','Addons\Doorlock\Controller\GwController@hxjDelGateway');
//    Router::post('/doorlock/gw/hxjSetGatewayChannel','Addons\Doorlock\Controller\GwController@hxjSetGatewayChannel');
//    Router::post('/doorlock/gw/hxjGatewaySearchLockRssi','Addons\Doorlock\Controller\GwController@hxjGatewaySearchLockRssi');
//    Router::post('/doorlock/gw/hxjGetGatewayList','Addons\Doorlock\Controller\GwController@hxjGetGatewayList');
//    Router::post('/doorlock/gw/hxjGetGatewayInfo','Addons\Doorlock\Controller\GwController@hxjGetGatewayInfo');
//    Router::post('/doorlock/gw/hxjAddBluetoothDoorLock','Addons\Doorlock\Controller\GwController@hxjAddBluetoothDoorLock');
//    Router::post('/doorlock/gw/hxjLockBindingGateway','Addons\Doorlock\Controller\GwController@hxjLockBindingGateway');
//    Router::post('/doorlock/gw/hxjLockUnBindingGateway','Addons\Doorlock\Controller\GwController@hxjLockUnBindingGateway');
//    Router::post('/doorlock/gw/apartmentAddCardKey','Addons\Doorlock\Controller\GwController@apartmentAddCardKey');
//    Router::post('/doorlock/gw/hxjSetClientTime','Addons\Doorlock\Controller\GwController@hxjSetClientTime');
//    Router::post('/doorlock/gw/hxjOpenDoorLock','Addons\Doorlock\Controller\GwController@hxjOpenDoorLock');
//    Router::post('/doorlock/gw/hxjAddPasswordKey','Addons\Doorlock\Controller\GwController@hxjAddPasswordKey');
//    Router::post('/doorlock/gw/hxjAddCardKey','Addons\Doorlock\Controller\GwController@hxjAddCardKey');
//    Router::post('/doorlock/gw/hxjModifyKeyExpiryDate','Addons\Doorlock\Controller\GwController@hxjModifyKeyExpiryDate');
//    Router::post('/doorlock/gw/hxjDelKey','Addons\Doorlock\Controller\GwController@hxjDelKey');
//    Router::post('/doorlock/gw/hxjAllowKey','Addons\Doorlock\Controller\GwController@hxjAllowKey');
//    Router::post('/doorlock/gw/hxjSetParam','Addons\Doorlock\Controller\GwController@hxjSetParam');
//    Router::post('/doorlock/gw/hxjSynLockInfo','Addons\Doorlock\Controller\GwController@hxjSynLockInfo');
//    Router::post('/doorlock/gw/hxjSynLockRecordNum','Addons\Doorlock\Controller\GwController@hxjSynLockRecordNum');
//    Router::post('/doorlock/gw/hxjSynLockRecord','Addons\Doorlock\Controller\GwController@hxjSynLockRecord');
//    Router::post('/doorlock/gw/hxjSynLockKey','Addons\Doorlock\Controller\GwController@hxjSynLockKey');
//    Router::post('/doorlock/gw/hxjTouchAddFingerPrintKey','Addons\Doorlock\Controller\GwController@hxjTouchAddFingerPrintKey');
//    Router::post('/doorlock/gw/hxjGatewayAddLockFingerPrint','Addons\Doorlock\Controller\GwController@hxjGatewayAddLockFingerPrint');
//    Router::post('/doorlock/gw/hxjModifyKey','Addons\Doorlock\Controller\GwController@hxjModifyKey');
//    Router::post('/doorlock/gw/hxjGetLockList','Addons\Doorlock\Controller\GwController@hxjGetLockList');
//    Router::post('/doorlock/gw/getAttribute','Addons\Doorlock\Controller\GwController@getAttribute');
//    Router::post('/doorlock/gw/writeJson','Addons\Doorlock\Controller\GwController@writeJson');
//    Router::post('/doorlock/gw/handleAround','Addons\Doorlock\Controller\GwController@handleAround');
//    Router::post('/doorlock/gw/makePipeline','Addons\Doorlock\Controller\GwController@makePipeline');
//    Router::post('/doorlock/gw/getClassesAspects','Addons\Doorlock\Controller\GwController@getClassesAspects');
//    Router::post('/doorlock/gw/getAnnotationAspects','Addons\Doorlock\Controller\GwController@getAnnotationAspects');
//    Router::post('/doorlock/gw/getGatewayList','Addons\Doorlock\Controller\GwController@GetGatewayList');
//    Router::post('/doorlock/gw/ModifyKeyExpiryDate','Addons\Doorlock\Controller\GwController@ModifyKeyExpiryDate');
//    Router::post('/doorlock/gw/AddCardKeys','Addons\Doorlock\Controller\GwController@AddCardKeys');
//
//
//    //    智能电表
//    Router::post('/doorlock/EnergyMeter/getSign','Addons\EnergyMeter\Controller\DevController@getSign');
//    Router::post('/doorlock/EnergyMeter/bindDev','Addons\EnergyMeter\Controller\DevController@bindDev');
//    Router::post('/doorlock/EnergyMeter/delDev','Addons\EnergyMeter\Controller\DevController@delDev');
//    Router::post('/doorlock/EnergyMeter/removeDev','Addons\EnergyMeter\Controller\DevController@removeDev');
//    Router::post('/doorlock/EnergyMeter/editDev','Addons\EnergyMeter\Controller\DevController@editDev');
//
//    // 通断器
//    Router::post('/receptacle/Lnoff/bindDev','Addons\Receptacle\Controller\lnoffController@bindDev');
//    Router::post('/receptacle/Lnoff/removeDev','Addons\Receptacle\Controller\lnoffController@removeDev');
//    Router::post('/receptacle/Lnoff/editDev','Addons\Receptacle\Controller\lnoffController@editDev');
//    Router::post('/receptacle/Lnoff/delDev','Addons\Receptacle\Controller\lnoffController@delDev');
//
//    //智能开关
//
//    Router::post('/receptacle/OnOff/bindDev','Addons\Receptacle\Controller\OnOffController@bindDev');
//    Router::post('/receptacle/OnOff/removeDev','Addons\Receptacle\Controller\OnOffController@removeDev');
//    Router::post('/receptacle/OnOff/editDev','Addons\Receptacle\Controller\OnOffController@editDev');
//    Router::post('/receptacle/OnOff/delDev','Addons\Receptacle\Controller\OnOffController@delDev');
//    Router::post('/receptacle/OnOff/detail','Addons\Receptacle\Controller\OnOffController@detail');
//
//    //通通锁有关设备
//    Router::post('/ttlock/oauth/createtoken','Addons\Ttlock\Controller\OauthController@createtoken');
//    Router::post('/ttlock/oauth/refreshToken','Addons\Ttlock\Controller\OauthController@refreshToken');
//
//
//    Router::post('/ttlock/user/userInit','Addons\Ttlock\Controller\UserController@userInit');
//    Router::post('/ttlock/user/register','Addons\Ttlock\Controller\UserController@register');
//    Router::post('/ttlock/user/list','Addons\Ttlock\Controller\UserController@list');
//    Router::post('/ttlock/user/resetPassword','Addons\Ttlock\Controller\UserController@resetPassword');
//    Router::post('/ttlock/user/delete','Addons\Ttlock\Controller\UserController@delete');
//
//    Router::post('/ttlock/lock/initialize','Addons\Ttlock\Controller\LockController@initialize');
//    Router::post('/ttlock/lock/lockList','Addons\Ttlock\Controller\LockController@lockList');
//    Router::post('/ttlock/lock/detail','Addons\Ttlock\Controller\LockController@detail');
//    Router::post('/ttlock/lock/delete','Addons\Ttlock\Controller\LockController@delete');
//    Router::post('/ttlock/lock/updateLockData','Addons\Ttlock\Controller\LockController@updateLockData');
//    Router::post('/ttlock/lock/rename','Addons\Ttlock\Controller\LockController@rename');
//    Router::post('/ttlock/lock/changeAdminKeyboardPwd','Addons\Ttlock\Controller\LockController@changeAdminKeyboardPwd');
//    Router::post('/ttlock/lock/transfer','Addons\Ttlock\Controller\LockController@transfer');
//    Router::post('/ttlock/lock/updateElectricQuantity','Addons\Ttlock\Controller\LockController@updateElectricQuantity');
//    Router::post('/ttlock/lock/setAutoLockTime','Addons\Ttlock\Controller\LockController@setAutoLockTime');
//    Router::post('/ttlock/lock/configPassageMode','Addons\Ttlock\Controller\LockController@configPassageMode');
//    Router::post('/ttlock/lock/getPassageModeConfig','Addons\Ttlock\Controller\LockController@getPassageModeConfig');
//    Router::post('/ttlock/lock/setHotelCardSector','Addons\Ttlock\Controller\LockController@setHotelCardSector');
//    Router::post('/ttlock/lock/updateSetting','Addons\Ttlock\Controller\LockController@updateSetting');
//    Router::post('/ttlock/lock/querySetting','Addons\Ttlock\Controller\LockController@querySetting');
//
//    Router::post('/ttlock/KeyboardPwd/getKeyboardPasswordFromRequest','Addons\Ttlock\Controller\KeyboardPwdController@getKeyboardPasswordFromRequest');
//
//});

Router::addServer('ws', function () {
//    默认
    Router::get('/', 'App\WebSocketController\IndexController');
//    授权
    Router::get('/auth', 'App\WebSocketController\AuthController');
//    插件
    Router::get('/addons', 'App\WebSocketController\AddonsController');
//    其他
    Router::get('/receptacle/index/index', 'Addons\Receptacle\WebSocketController\IndexController@index');
    Router::get('/receptacle/switchdev/index', 'Addons\Receptacle\WebSocketController\SwitchdevController@index');
    Router::get('/receptacle/switchdev/queue', 'Addons\Receptacle\WebSocketController\SwitchdevController@queue');
    Router::get('/receptacle/switchdev/status', 'Addons\Receptacle\WebSocketController\SwitchdevController@status');
    Router::get('/receptacle/switchdev/listen', 'Addons\Receptacle\WebSocketController\SwitchdevController@listen');

    Router::get('/centralcontrol/zyj/index', 'Addons\CentralControl\WebSocketController\ZyjController@index');
    Router::get('/centralcontrol/zyj/guayi', 'Addons\CentralControl\WebSocketController\ZyjController@guayi');
    Router::get('/centralcontrol/zyj/status', 'Addons\CentralControl\WebSocketController\ZyjController@status');
    Router::get('/centralcontrol/zyj/getstatus', 'Addons\CentralControl\WebSocketController\ZyjController@getStatus');

    Router::get('/centralcontrol/zyj/deviceinit', 'Addons\CentralControl\WebSocketController\ZyjController@deviceinit');
    Router::get('/centralcontrol/zyj/upfd', 'Addons\CentralControl\WebSocketController\ZyjController@upfd');
    Router::get('/centralcontrol/zyj/deviceinfo', 'Addons\CentralControl\WebSocketController\ZyjController@deviceinfo');
    Router::get('/centralcontrol/zyj/getdevicedbyclientId', 'Addons\CentralControl\WebSocketController\ZyjController@getDevicedByClientId');


    Router::get('/sellingcabinet/selling/goodsnotice', 'Addons\SellingCabinet\WebSocketController\SellingController@goodsNotice');
    Router::get('/sellingcabinet/selling/listendev', 'Addons\SellingCabinet\WebSocketController\SellingController@listenDev');
    Router::get('/sellingcabinet/selling/status', 'Addons\SellingCabinet\WebSocketController\SellingController@status');

    Router::get('/yrddtu/dtua/read', 'Addons\YrdDtu\WebSocketController\DtuaController@read');
    Router::get('/yrddtu/dtua/command', 'Addons\YrdDtu\WebSocketController\DtuaController@command');
});